
-- --------------------------------------------------
-- Entity Designer DDL Script for SQL Server 2005, 2008, and Azure
-- --------------------------------------------------
-- Date Created: 06/19/2012 02:09:06
-- Generated from EDMX file: D:\My Projects\HumanResource\Project\HR-Business\HRModel.edmx
-- --------------------------------------------------

SET QUOTED_IDENTIFIER OFF;
GO
USE [HumanResource];
GO
IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]');
GO

-- --------------------------------------------------
-- Dropping existing FOREIGN KEY constraints
-- --------------------------------------------------

IF OBJECT_ID(N'[dbo].[FK_EmployeePayrollStructure]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[PayrollStructures] DROP CONSTRAINT [FK_EmployeePayrollStructure];
GO
IF OBJECT_ID(N'[dbo].[FK_EmployeeAttendance]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Attendances] DROP CONSTRAINT [FK_EmployeeAttendance];
GO
IF OBJECT_ID(N'[dbo].[FK_EmployeeCompany]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Employees] DROP CONSTRAINT [FK_EmployeeCompany];
GO
IF OBJECT_ID(N'[dbo].[FK_CompanyCompanyPayrollHistory]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[CompanyPayrollHistories] DROP CONSTRAINT [FK_CompanyCompanyPayrollHistory];
GO
IF OBJECT_ID(N'[dbo].[FK_CompanyPayrollHistoryPayrollHistory]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[PayrollHistories] DROP CONSTRAINT [FK_CompanyPayrollHistoryPayrollHistory];
GO
IF OBJECT_ID(N'[dbo].[FK_EmployeePayrollHistory]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[PayrollHistories] DROP CONSTRAINT [FK_EmployeePayrollHistory];
GO
IF OBJECT_ID(N'[dbo].[FK_SalaryHeadPayrollStructure]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[PayrollStructures] DROP CONSTRAINT [FK_SalaryHeadPayrollStructure];
GO
IF OBJECT_ID(N'[dbo].[FK_EmployeeDepartment]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Employees] DROP CONSTRAINT [FK_EmployeeDepartment];
GO
IF OBJECT_ID(N'[dbo].[FK_EmployeeDesignation]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Employees] DROP CONSTRAINT [FK_EmployeeDesignation];
GO
IF OBJECT_ID(N'[dbo].[FK_EmployeeEmployeeAccessLog]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[EmployeeAccessLogs] DROP CONSTRAINT [FK_EmployeeEmployeeAccessLog];
GO
IF OBJECT_ID(N'[dbo].[FK_EmploymentTypeEmployee]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Employees] DROP CONSTRAINT [FK_EmploymentTypeEmployee];
GO
IF OBJECT_ID(N'[dbo].[FK_EmployeeEmployeeAccounts]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[EmployeeAccounts] DROP CONSTRAINT [FK_EmployeeEmployeeAccounts];
GO
IF OBJECT_ID(N'[dbo].[FK_EmployeeAccountsSalaryHead]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[EmployeeAccounts] DROP CONSTRAINT [FK_EmployeeAccountsSalaryHead];
GO
IF OBJECT_ID(N'[dbo].[FK_PayrollHistoryPayrollHistoryDetail]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[PayrollHistoryDetails] DROP CONSTRAINT [FK_PayrollHistoryPayrollHistoryDetail];
GO

-- --------------------------------------------------
-- Dropping existing tables
-- --------------------------------------------------

IF OBJECT_ID(N'[dbo].[Employees]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Employees];
GO
IF OBJECT_ID(N'[dbo].[PayrollStructures]', 'U') IS NOT NULL
    DROP TABLE [dbo].[PayrollStructures];
GO
IF OBJECT_ID(N'[dbo].[Designations]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Designations];
GO
IF OBJECT_ID(N'[dbo].[Departments]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Departments];
GO
IF OBJECT_ID(N'[dbo].[EmploymentTypes]', 'U') IS NOT NULL
    DROP TABLE [dbo].[EmploymentTypes];
GO
IF OBJECT_ID(N'[dbo].[EmployeeAccessLogs]', 'U') IS NOT NULL
    DROP TABLE [dbo].[EmployeeAccessLogs];
GO
IF OBJECT_ID(N'[dbo].[Companies]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Companies];
GO
IF OBJECT_ID(N'[dbo].[Attendances]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Attendances];
GO
IF OBJECT_ID(N'[dbo].[PayrollHistories]', 'U') IS NOT NULL
    DROP TABLE [dbo].[PayrollHistories];
GO
IF OBJECT_ID(N'[dbo].[CompanyPayrollHistories]', 'U') IS NOT NULL
    DROP TABLE [dbo].[CompanyPayrollHistories];
GO
IF OBJECT_ID(N'[dbo].[SalaryHeads]', 'U') IS NOT NULL
    DROP TABLE [dbo].[SalaryHeads];
GO
IF OBJECT_ID(N'[dbo].[EmployeeAccounts]', 'U') IS NOT NULL
    DROP TABLE [dbo].[EmployeeAccounts];
GO
IF OBJECT_ID(N'[dbo].[PayrollHistoryDetails]', 'U') IS NOT NULL
    DROP TABLE [dbo].[PayrollHistoryDetails];
GO

-- --------------------------------------------------
-- Creating all tables
-- --------------------------------------------------

-- Creating table 'Employees'
CREATE TABLE [dbo].[Employees] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [FirstName] nvarchar(max)  NULL,
    [LastName] nvarchar(max)  NULL,
    [OfficeId] nvarchar(max)  NULL,
    [DateOfJoin] datetime  NULL,
    [DateOfConfirmation] datetime  NULL,
    [IsActive] bit  NULL,
    [DateOfResign] datetime  NULL,
    [CompanyId] int  NOT NULL,
    [DepartmentId] int  NOT NULL,
    [DesignationId] int  NOT NULL,
    [EmploymentTypeId] int  NOT NULL,
    [PersonalDetail_DateOfBirth] datetime  NULL,
    [PersonalDetail_Gender] nvarchar(max)  NULL,
    [PersonalDetail_MaritalStatus] nvarchar(max)  NULL,
    [PersonalDetail_Nationality] nvarchar(max)  NULL,
    [PersonalDetail_Photo] varbinary(max)  NULL,
    [ContactDetail_PeresentAddress] nvarchar(max)  NULL,
    [ContactDetail_PermanentAddress] nvarchar(max)  NULL,
    [ContactDetail_Phone] nvarchar(max)  NULL,
    [ContactDetail_Email] nvarchar(max)  NULL,
    [ContactDetail_EmergencyContact1] nvarchar(max)  NULL,
    [ContactDetail_EmergencyContact2] nvarchar(max)  NULL
);
GO

-- Creating table 'PayrollStructures'
CREATE TABLE [dbo].[PayrollStructures] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Amount] nvarchar(max)  NOT NULL,
    [EmployeeId] int  NOT NULL,
    [SalaryHeadId] int  NOT NULL
);
GO

-- Creating table 'Designations'
CREATE TABLE [dbo].[Designations] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Title] nvarchar(max)  NULL
);
GO

-- Creating table 'Departments'
CREATE TABLE [dbo].[Departments] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Title] nvarchar(max)  NULL
);
GO

-- Creating table 'EmploymentTypes'
CREATE TABLE [dbo].[EmploymentTypes] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Title] nvarchar(max)  NOT NULL
);
GO

-- Creating table 'EmployeeAccessLogs'
CREATE TABLE [dbo].[EmployeeAccessLogs] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [AccessDateTime] datetime  NULL,
    [AccessDirection] nvarchar(max)  NULL,
    [EmployeeId] int  NOT NULL
);
GO

-- Creating table 'Companies'
CREATE TABLE [dbo].[Companies] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Title] nvarchar(max)  NULL
);
GO

-- Creating table 'Attendances'
CREATE TABLE [dbo].[Attendances] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Date] datetime  NULL,
    [HoursWorked] decimal(18,0)  NULL,
    [IsLate] bit  NOT NULL,
    [OverTimeWorked] decimal(18,0)  NULL,
    [EmployeeId] int  NOT NULL
);
GO

-- Creating table 'PayrollHistories'
CREATE TABLE [dbo].[PayrollHistories] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [FromDate] datetime  NULL,
    [ToDate] datetime  NOT NULL,
    [PresentDays] int  NULL,
    [LateDays] int  NULL,
    [LeaveWithPay] int  NULL,
    [LeaveWithoutPay] int  NULL,
    [AbsentDays] int  NULL,
    [TotalAddition] decimal(18,0)  NULL,
    [TotalSalary] decimal(18,0)  NULL,
    [TotalDeduction] decimal(18,0)  NULL,
    [NetPayable] decimal(18,0)  NULL,
    [CompanyPayrollHistoryId] int  NOT NULL,
    [EmployeeId] int  NOT NULL
);
GO

-- Creating table 'CompanyPayrollHistories'
CREATE TABLE [dbo].[CompanyPayrollHistories] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [FromDate] datetime  NULL,
    [ToDate] datetime  NULL,
    [TotalWorkDays] int  NULL,
    [TotalEmployees] int  NULL,
    [NetPayable] decimal(18,0)  NULL,
    [GrossPayable] decimal(18,0)  NULL,
    [TotalDeduction] decimal(18,0)  NULL,
    [CompanyId] int  NOT NULL
);
GO

-- Creating table 'SalaryHeads'
CREATE TABLE [dbo].[SalaryHeads] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Title] nvarchar(max)  NOT NULL,
    [Description] nvarchar(max)  NULL,
    [Label] nvarchar(max)  NOT NULL,
    [Type] nvarchar(max)  NULL,
    [IsCompanyExpense] bit  NOT NULL,
    [CalculationMethod] nvarchar(max)  NULL
);
GO

-- Creating table 'EmployeeAccounts'
CREATE TABLE [dbo].[EmployeeAccounts] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Date] datetime  NULL,
    [Description] nvarchar(max)  NULL,
    [Deposit] decimal(18,0)  NULL,
    [Withdraw] decimal(18,0)  NULL,
    [Balance] decimal(18,0)  NOT NULL,
    [EmployeeId] int  NOT NULL,
    [SalaryHeadId] int  NOT NULL
);
GO

-- Creating table 'PayrollHistoryDetails'
CREATE TABLE [dbo].[PayrollHistoryDetails] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Amount] decimal(18,0)  NOT NULL,
    [PayrollHistoryId] int  NOT NULL
);
GO

-- --------------------------------------------------
-- Creating all PRIMARY KEY constraints
-- --------------------------------------------------

-- Creating primary key on [Id] in table 'Employees'
ALTER TABLE [dbo].[Employees]
ADD CONSTRAINT [PK_Employees]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'PayrollStructures'
ALTER TABLE [dbo].[PayrollStructures]
ADD CONSTRAINT [PK_PayrollStructures]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Designations'
ALTER TABLE [dbo].[Designations]
ADD CONSTRAINT [PK_Designations]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Departments'
ALTER TABLE [dbo].[Departments]
ADD CONSTRAINT [PK_Departments]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'EmploymentTypes'
ALTER TABLE [dbo].[EmploymentTypes]
ADD CONSTRAINT [PK_EmploymentTypes]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'EmployeeAccessLogs'
ALTER TABLE [dbo].[EmployeeAccessLogs]
ADD CONSTRAINT [PK_EmployeeAccessLogs]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Companies'
ALTER TABLE [dbo].[Companies]
ADD CONSTRAINT [PK_Companies]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Attendances'
ALTER TABLE [dbo].[Attendances]
ADD CONSTRAINT [PK_Attendances]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'PayrollHistories'
ALTER TABLE [dbo].[PayrollHistories]
ADD CONSTRAINT [PK_PayrollHistories]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'CompanyPayrollHistories'
ALTER TABLE [dbo].[CompanyPayrollHistories]
ADD CONSTRAINT [PK_CompanyPayrollHistories]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'SalaryHeads'
ALTER TABLE [dbo].[SalaryHeads]
ADD CONSTRAINT [PK_SalaryHeads]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'EmployeeAccounts'
ALTER TABLE [dbo].[EmployeeAccounts]
ADD CONSTRAINT [PK_EmployeeAccounts]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'PayrollHistoryDetails'
ALTER TABLE [dbo].[PayrollHistoryDetails]
ADD CONSTRAINT [PK_PayrollHistoryDetails]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- --------------------------------------------------
-- Creating all FOREIGN KEY constraints
-- --------------------------------------------------

-- Creating foreign key on [EmployeeId] in table 'PayrollStructures'
ALTER TABLE [dbo].[PayrollStructures]
ADD CONSTRAINT [FK_EmployeePayrollStructure]
    FOREIGN KEY ([EmployeeId])
    REFERENCES [dbo].[Employees]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_EmployeePayrollStructure'
CREATE INDEX [IX_FK_EmployeePayrollStructure]
ON [dbo].[PayrollStructures]
    ([EmployeeId]);
GO

-- Creating foreign key on [EmployeeId] in table 'Attendances'
ALTER TABLE [dbo].[Attendances]
ADD CONSTRAINT [FK_EmployeeAttendance]
    FOREIGN KEY ([EmployeeId])
    REFERENCES [dbo].[Employees]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_EmployeeAttendance'
CREATE INDEX [IX_FK_EmployeeAttendance]
ON [dbo].[Attendances]
    ([EmployeeId]);
GO

-- Creating foreign key on [CompanyId] in table 'Employees'
ALTER TABLE [dbo].[Employees]
ADD CONSTRAINT [FK_EmployeeCompany]
    FOREIGN KEY ([CompanyId])
    REFERENCES [dbo].[Companies]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_EmployeeCompany'
CREATE INDEX [IX_FK_EmployeeCompany]
ON [dbo].[Employees]
    ([CompanyId]);
GO

-- Creating foreign key on [CompanyId] in table 'CompanyPayrollHistories'
ALTER TABLE [dbo].[CompanyPayrollHistories]
ADD CONSTRAINT [FK_CompanyCompanyPayrollHistory]
    FOREIGN KEY ([CompanyId])
    REFERENCES [dbo].[Companies]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_CompanyCompanyPayrollHistory'
CREATE INDEX [IX_FK_CompanyCompanyPayrollHistory]
ON [dbo].[CompanyPayrollHistories]
    ([CompanyId]);
GO

-- Creating foreign key on [CompanyPayrollHistoryId] in table 'PayrollHistories'
ALTER TABLE [dbo].[PayrollHistories]
ADD CONSTRAINT [FK_CompanyPayrollHistoryPayrollHistory]
    FOREIGN KEY ([CompanyPayrollHistoryId])
    REFERENCES [dbo].[CompanyPayrollHistories]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_CompanyPayrollHistoryPayrollHistory'
CREATE INDEX [IX_FK_CompanyPayrollHistoryPayrollHistory]
ON [dbo].[PayrollHistories]
    ([CompanyPayrollHistoryId]);
GO

-- Creating foreign key on [EmployeeId] in table 'PayrollHistories'
ALTER TABLE [dbo].[PayrollHistories]
ADD CONSTRAINT [FK_EmployeePayrollHistory]
    FOREIGN KEY ([EmployeeId])
    REFERENCES [dbo].[Employees]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_EmployeePayrollHistory'
CREATE INDEX [IX_FK_EmployeePayrollHistory]
ON [dbo].[PayrollHistories]
    ([EmployeeId]);
GO

-- Creating foreign key on [SalaryHeadId] in table 'PayrollStructures'
ALTER TABLE [dbo].[PayrollStructures]
ADD CONSTRAINT [FK_SalaryHeadPayrollStructure]
    FOREIGN KEY ([SalaryHeadId])
    REFERENCES [dbo].[SalaryHeads]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_SalaryHeadPayrollStructure'
CREATE INDEX [IX_FK_SalaryHeadPayrollStructure]
ON [dbo].[PayrollStructures]
    ([SalaryHeadId]);
GO

-- Creating foreign key on [DepartmentId] in table 'Employees'
ALTER TABLE [dbo].[Employees]
ADD CONSTRAINT [FK_EmployeeDepartment]
    FOREIGN KEY ([DepartmentId])
    REFERENCES [dbo].[Departments]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_EmployeeDepartment'
CREATE INDEX [IX_FK_EmployeeDepartment]
ON [dbo].[Employees]
    ([DepartmentId]);
GO

-- Creating foreign key on [DesignationId] in table 'Employees'
ALTER TABLE [dbo].[Employees]
ADD CONSTRAINT [FK_EmployeeDesignation]
    FOREIGN KEY ([DesignationId])
    REFERENCES [dbo].[Designations]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_EmployeeDesignation'
CREATE INDEX [IX_FK_EmployeeDesignation]
ON [dbo].[Employees]
    ([DesignationId]);
GO

-- Creating foreign key on [EmployeeId] in table 'EmployeeAccessLogs'
ALTER TABLE [dbo].[EmployeeAccessLogs]
ADD CONSTRAINT [FK_EmployeeEmployeeAccessLog]
    FOREIGN KEY ([EmployeeId])
    REFERENCES [dbo].[Employees]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_EmployeeEmployeeAccessLog'
CREATE INDEX [IX_FK_EmployeeEmployeeAccessLog]
ON [dbo].[EmployeeAccessLogs]
    ([EmployeeId]);
GO

-- Creating foreign key on [EmploymentTypeId] in table 'Employees'
ALTER TABLE [dbo].[Employees]
ADD CONSTRAINT [FK_EmploymentTypeEmployee]
    FOREIGN KEY ([EmploymentTypeId])
    REFERENCES [dbo].[EmploymentTypes]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_EmploymentTypeEmployee'
CREATE INDEX [IX_FK_EmploymentTypeEmployee]
ON [dbo].[Employees]
    ([EmploymentTypeId]);
GO

-- Creating foreign key on [EmployeeId] in table 'EmployeeAccounts'
ALTER TABLE [dbo].[EmployeeAccounts]
ADD CONSTRAINT [FK_EmployeeEmployeeAccounts]
    FOREIGN KEY ([EmployeeId])
    REFERENCES [dbo].[Employees]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_EmployeeEmployeeAccounts'
CREATE INDEX [IX_FK_EmployeeEmployeeAccounts]
ON [dbo].[EmployeeAccounts]
    ([EmployeeId]);
GO

-- Creating foreign key on [SalaryHeadId] in table 'EmployeeAccounts'
ALTER TABLE [dbo].[EmployeeAccounts]
ADD CONSTRAINT [FK_EmployeeAccountsSalaryHead]
    FOREIGN KEY ([SalaryHeadId])
    REFERENCES [dbo].[SalaryHeads]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_EmployeeAccountsSalaryHead'
CREATE INDEX [IX_FK_EmployeeAccountsSalaryHead]
ON [dbo].[EmployeeAccounts]
    ([SalaryHeadId]);
GO

-- Creating foreign key on [PayrollHistoryId] in table 'PayrollHistoryDetails'
ALTER TABLE [dbo].[PayrollHistoryDetails]
ADD CONSTRAINT [FK_PayrollHistoryPayrollHistoryDetail]
    FOREIGN KEY ([PayrollHistoryId])
    REFERENCES [dbo].[PayrollHistories]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_PayrollHistoryPayrollHistoryDetail'
CREATE INDEX [IX_FK_PayrollHistoryPayrollHistoryDetail]
ON [dbo].[PayrollHistoryDetails]
    ([PayrollHistoryId]);
GO

-- --------------------------------------------------
-- Script has ended
-- --------------------------------------------------